﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Gds.Model.ConfigModel.BasicSystemInfo
{
    public class RunningStateModel : INotifyPropertyChanged
    {
        private int _itemIndex;
        private string _userName;
        private bool _onlineFlag;
        private string _serverHeartBeat;
        private string _clientHeartBeat;
        private bool _isVoiceOpen;
        private bool _serverSyncAllFlag;
        private bool _serverSyncAdminModelFlag;
        private string _serverTime;

        /// <summary>
        /// 序号
        /// </summary>
        public int ItemIndex
        {
            get { return _itemIndex; }
            set
            {
                _itemIndex = value;
                OnPropertyChange("ItemIndex");
            }
        }
        /// <summary>
        /// 用户名
        /// </summary>
        public string UserName
        {
            get { return _userName; }
            set
            {
                _userName = value;
                OnPropertyChange("UserName");
            }
        }
        /// <summary>
        /// 用户名
        /// </summary>
        public bool OnlineFlag
        {
            get { return _onlineFlag; }
            set
            {
                _onlineFlag = value;
                OnPropertyChange("OnlineFlag");
            }
        }
        /// <summary>
        /// 服务器心跳确认字符
        /// </summary>
        public string ServerHeartBeat
        {
            get { return _serverHeartBeat; }
            set
            {
                _serverHeartBeat = value;
                OnPropertyChange("ServerHeartBeat");
            }
        }
        /// <summary>
        /// 客户端心跳确认字符
        /// </summary>
        public string ClientHeartBeat
        {
            get { return _clientHeartBeat; }
            set
            {
                _clientHeartBeat = value;
                OnPropertyChange("ClientHeartBeat");
            }
        }
        /// <summary>
        /// 是否启用语音播报功能
        /// </summary>
        public bool IsVoiceOpen
        {
            get { return _isVoiceOpen; }
            set
            {
                _isVoiceOpen = value;
                OnPropertyChange("IsVoiceOpen");
            }
        }
        /// <summary>
        /// 同步任务 Flag
        /// </summary>
        public bool ServerSyncAllFlag
        {
            get { return _serverSyncAllFlag; }
            set
            {
                _serverSyncAllFlag = value;
                OnPropertyChange("ServerSyncAllFlag");
            }
        }
        /// <summary>
        /// 同步用户配置 FLAG
        /// </summary>
        public bool ServerSyncAdminModelFlag
        {
            get { return _serverSyncAdminModelFlag; }
            set
            {
                _serverSyncAdminModelFlag = value;
                OnPropertyChange("ServerSyncAdminModelFlag");
            }
        }
        public string ServerTime
        {
            get { return _serverTime; }
            set
            {
                _serverTime = value;
                OnPropertyChange("ServerTime");
            }
        }
        public event PropertyChangedEventHandler PropertyChanged;
        public virtual void OnPropertyChange(string propertyName)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }
}
